#include "ui.h"

#include "vmgraph.h"

VMINT screen_width;
VMINT screen_height;
VMINT cur_lcd_support;

VMSTR img_name[IMG_ID_END];
struct gtalk_ui_struct gtalk_ui;

void lcd_support_init(void)
{
	screen_width = vm_graphic_get_screen_width();
	screen_height = vm_graphic_get_screen_height();

	if(QCIF_WIDTH == screen_width && QCIF_HEIGHT == screen_height)
	{
		cur_lcd_support = ENUM_SUPPORT_QCIF;
	}
	else if(QCIF_LS_WIDTH == screen_width && QCIF_LS_HEIGHT == screen_height)
	{
		cur_lcd_support = ENUM_SUPPORT_QCIF_LS;
	}
	if(QVGA_WIDTH == screen_width && QVGA_HEIGHT == screen_height)
	{
		cur_lcd_support = ENUM_SUPPORT_QVGA;
	}
	else if(QVGA_LS_WIDTH == screen_width && QVGA_LS_HEIGHT == screen_height)
	{
		cur_lcd_support = ENUM_SUPPORT_QVGA_LS;
	}
	if(WQVGA_WIDTH == screen_width && WQVGA_HEIGHT == screen_height)
	{
		cur_lcd_support = ENUM_SUPPORT_WQVGA;
	}
	
	switch(cur_lcd_support)
	{
	case ENUM_SUPPORT_QCIF:
		img_name[IMG_ID_LOGIN_LOGO] = "176X220_login_logo.gif";
		img_name[IMG_ID_BTN_BG] = "176X220_buttonbar.gif";
		img_name[IMG_ID_TITLEBG] = "176X220_title_bg.gif";
		img_name[IMG_ID_ARROW] = "arrow.gif";
		img_name[IMG_ID_STATUSOFFLINE] = "status_off.gif";
		img_name[IMG_ID_STATUSAWAY] = "status_away.gif";
		img_name[IMG_ID_STATUSONLINE] = "status_on.gif";
		img_name[IMG_ID_COMEMSG] = "comemsg.gif";

		gtalk_ui.softkey_bar.left = 0;
		gtalk_ui.softkey_bar.top = screen_height - 28;
		gtalk_ui.softkey_bar.right = screen_width;
		gtalk_ui.softkey_bar.bottom = screen_height;

		gtalk_ui.title_top_bg.left = 0;
		gtalk_ui.title_top_bg.top = 0;
		gtalk_ui.title_top_bg.right = screen_width;
		gtalk_ui.title_top_bg.bottom = 28;

		gtalk_ui.title_img_status.left = (gtalk_ui.title_top_bg.bottom - 12)/2;
		gtalk_ui.title_img_status.top = gtalk_ui.title_img_status.left;
		gtalk_ui.title_img_status.right = gtalk_ui.title_img_status.left*2 + 12;
		gtalk_ui.title_img_status.bottom = gtalk_ui.title_img_status.top + 12;

		gtalk_ui.title_msg_status.left = gtalk_ui.title_img_status.right;
		gtalk_ui.title_msg_status.top = gtalk_ui.title_top_bg.top + 1;
		gtalk_ui.title_msg_status.right = screen_width - gtalk_ui.title_top_bg.bottom;
		gtalk_ui.title_msg_status.bottom = gtalk_ui.title_top_bg.bottom - 1;

		gtalk_ui.listbox.left = 0;
		gtalk_ui.listbox.top = gtalk_ui.title_top_bg.bottom;
		gtalk_ui.listbox.right = screen_width;
		gtalk_ui.listbox.bottom = screen_height - (gtalk_ui.softkey_bar.bottom - gtalk_ui.softkey_bar.top);

		gtalk_ui.listbox_img_status.left = 0;
		gtalk_ui.listbox_img_status.right = 12;
		gtalk_ui.listbox_img_status.top = 0;
		gtalk_ui.listbox_img_status.bottom = 12;
	
		gtalk_ui.listbox_img_msgcome.right = screen_width - 12;
		gtalk_ui.listbox_img_msgcome.left = gtalk_ui.listbox_img_msgcome.right - 28;
		gtalk_ui.listbox_img_msgcome.top = 0;
		gtalk_ui.listbox_img_msgcome.bottom = 16;

		gtalk_ui.listbox_img_arrow.right = screen_width - 12;
		gtalk_ui.listbox_img_arrow.left = gtalk_ui.listbox_img_arrow.right - 8;
		gtalk_ui.listbox_img_arrow.top = 0;
		gtalk_ui.listbox_img_arrow.bottom = 8;
		
		gtalk_ui.listbox_username.left = gtalk_ui.listbox_img_status.right;
		gtalk_ui.listbox_username.right = gtalk_ui.listbox_img_msgcome.left;
		gtalk_ui.listbox_username.top = 0;
		gtalk_ui.listbox_username.bottom = 0;

		gtalk_ui.login_logo.left = 0;
		gtalk_ui.login_logo.top = 0;
		gtalk_ui.login_logo.right = screen_width;
		gtalk_ui.login_logo.bottom = 70;

		gtalk_ui.login_label_user.left = 5;
		gtalk_ui.login_label_user.top = gtalk_ui.login_logo.bottom + 1;
		gtalk_ui.login_label_user.right = screen_width - 5;
		gtalk_ui.login_label_user.bottom = gtalk_ui.login_label_user.top + 20;

		gtalk_ui.login_edit_user.left = 5;
		gtalk_ui.login_edit_user.top = gtalk_ui.login_label_user.bottom;
		gtalk_ui.login_edit_user.right = screen_width - 5;
		gtalk_ui.login_edit_user.bottom = gtalk_ui.login_edit_user.top + 20;

		gtalk_ui.login_label_pass.left = 5;
		gtalk_ui.login_label_pass.top = gtalk_ui.login_edit_user.bottom + 1;
		gtalk_ui.login_label_pass.right = screen_width - 5;
		gtalk_ui.login_label_pass.bottom = gtalk_ui.login_label_pass.top + 20;

		gtalk_ui.login_edit_pass.left = 5;
		gtalk_ui.login_edit_pass.top = gtalk_ui.login_label_pass.bottom;
		gtalk_ui.login_edit_pass.right = screen_width - 5;
		gtalk_ui.login_edit_pass.bottom = gtalk_ui.login_edit_pass.top + 20;
		break;
	case ENUM_SUPPORT_QCIF_LS:
		img_name[IMG_ID_LOGIN_LOGO] = "220X176_login_logo.gif";
		img_name[IMG_ID_BTN_BG] = "220X176_buttonbar.gif";
		img_name[IMG_ID_TITLEBG] = "220X176_title_bg.gif";
		img_name[IMG_ID_ARROW] = "arrow.gif";
		img_name[IMG_ID_STATUSOFFLINE] = "status_off.gif";
		img_name[IMG_ID_STATUSAWAY] = "status_away.gif";
		img_name[IMG_ID_STATUSONLINE] = "status_on.gif";
		img_name[IMG_ID_COMEMSG] = "comemsg.gif";
		
		gtalk_ui.softkey_bar.left = 0;
		gtalk_ui.softkey_bar.top = screen_height - 28;
		gtalk_ui.softkey_bar.right = screen_width;
		gtalk_ui.softkey_bar.bottom = screen_height;

		gtalk_ui.title_top_bg.left = 0;
		gtalk_ui.title_top_bg.top = 0;
		gtalk_ui.title_top_bg.right = screen_width;
		gtalk_ui.title_top_bg.bottom = 28;

		gtalk_ui.title_img_status.left = (gtalk_ui.title_top_bg.bottom - 12)/2;
		gtalk_ui.title_img_status.top = gtalk_ui.title_img_status.left;
		gtalk_ui.title_img_status.right = gtalk_ui.title_img_status.left*2 + 12;
		gtalk_ui.title_img_status.bottom = gtalk_ui.title_img_status.top + 12;

		gtalk_ui.title_msg_status.left = gtalk_ui.title_img_status.right;
		gtalk_ui.title_msg_status.top = gtalk_ui.title_top_bg.top + 1;
		gtalk_ui.title_msg_status.right = screen_width - gtalk_ui.title_top_bg.bottom;
		gtalk_ui.title_msg_status.bottom = gtalk_ui.title_top_bg.bottom - 1;

		gtalk_ui.listbox.left = 0;
		gtalk_ui.listbox.top = gtalk_ui.title_top_bg.bottom;
		gtalk_ui.listbox.right = screen_width;
		gtalk_ui.listbox.bottom = screen_height - (gtalk_ui.softkey_bar.bottom - gtalk_ui.softkey_bar.top);

		gtalk_ui.listbox_img_status.left = 0;
		gtalk_ui.listbox_img_status.right = 12;
		gtalk_ui.listbox_img_status.top = 0;
		gtalk_ui.listbox_img_status.bottom = 12;
	
		gtalk_ui.listbox_img_msgcome.right = screen_width - 12;
		gtalk_ui.listbox_img_msgcome.left = gtalk_ui.listbox_img_msgcome.right - 28;
		gtalk_ui.listbox_img_msgcome.top = 0;
		gtalk_ui.listbox_img_msgcome.bottom = 16;

		gtalk_ui.listbox_img_arrow.right = screen_width - 12;
		gtalk_ui.listbox_img_arrow.left = gtalk_ui.listbox_img_arrow.right - 8;
		gtalk_ui.listbox_img_arrow.top = 0;
		gtalk_ui.listbox_img_arrow.bottom = 8;
		
		gtalk_ui.listbox_username.left = gtalk_ui.listbox_img_status.right;
		gtalk_ui.listbox_username.right = gtalk_ui.listbox_img_msgcome.left;
		gtalk_ui.listbox_username.top = 0;
		gtalk_ui.listbox_username.bottom = 0;

		gtalk_ui.login_logo.left = 0;
		gtalk_ui.login_logo.top = 0;
		gtalk_ui.login_logo.right = screen_width;
		gtalk_ui.login_logo.bottom = 70;

		gtalk_ui.login_label_user.left = 5;
		gtalk_ui.login_label_user.top = gtalk_ui.login_logo.bottom;
		gtalk_ui.login_label_user.right = screen_width - 5;
		gtalk_ui.login_label_user.bottom = gtalk_ui.login_label_user.top + 18;

		gtalk_ui.login_edit_user.left = 5;
		gtalk_ui.login_edit_user.top = gtalk_ui.login_label_user.bottom;
		gtalk_ui.login_edit_user.right = screen_width - 5;
		gtalk_ui.login_edit_user.bottom = gtalk_ui.login_edit_user.top + 18;

		gtalk_ui.login_label_pass.left = 5;
		gtalk_ui.login_label_pass.top = gtalk_ui.login_edit_user.bottom;
		gtalk_ui.login_label_pass.right = screen_width - 5;
		gtalk_ui.login_label_pass.bottom = gtalk_ui.login_label_pass.top + 18;

		gtalk_ui.login_edit_pass.left = 5;
		gtalk_ui.login_edit_pass.top = gtalk_ui.login_label_pass.bottom;
		gtalk_ui.login_edit_pass.right = screen_width - 5;
		gtalk_ui.login_edit_pass.bottom = gtalk_ui.login_edit_pass.top + 18;
		break;
	case ENUM_SUPPORT_QVGA:
		img_name[IMG_ID_LOGIN_LOGO] = "240X320_login_logo.gif";
		img_name[IMG_ID_BTN_BG] = "240X320_buttonbar.gif";
		img_name[IMG_ID_TITLEBG] = "240X320_title_bg.gif";
		img_name[IMG_ID_ARROW] = "arrow.gif";
		img_name[IMG_ID_STATUSOFFLINE] = "status_off.gif";
		img_name[IMG_ID_STATUSAWAY] = "status_away.gif";
		img_name[IMG_ID_STATUSONLINE] = "status_on.gif";
		img_name[IMG_ID_COMEMSG] = "comemsg.gif";
		
		gtalk_ui.softkey_bar.left = 0;
		gtalk_ui.softkey_bar.top = screen_height - 28;
		gtalk_ui.softkey_bar.right = screen_width;
		gtalk_ui.softkey_bar.bottom = screen_height;

		gtalk_ui.title_top_bg.left = 0;
		gtalk_ui.title_top_bg.top = 0;
		gtalk_ui.title_top_bg.right = screen_width;
		gtalk_ui.title_top_bg.bottom = 28;

		gtalk_ui.title_img_status.left = (gtalk_ui.title_top_bg.bottom - 12)/2;
		gtalk_ui.title_img_status.top = gtalk_ui.title_img_status.left;
		gtalk_ui.title_img_status.right = gtalk_ui.title_img_status.left*2 + 12;
		gtalk_ui.title_img_status.bottom = gtalk_ui.title_img_status.top + 12;

		gtalk_ui.title_msg_status.left = gtalk_ui.title_img_status.right;
		gtalk_ui.title_msg_status.top = gtalk_ui.title_top_bg.top + 1;
		gtalk_ui.title_msg_status.right = screen_width - gtalk_ui.title_top_bg.bottom;
		gtalk_ui.title_msg_status.bottom = gtalk_ui.title_top_bg.bottom - 1;

		gtalk_ui.listbox.left = 0;
		gtalk_ui.listbox.top = gtalk_ui.title_top_bg.bottom;
		gtalk_ui.listbox.right = screen_width;
		gtalk_ui.listbox.bottom = screen_height - (gtalk_ui.softkey_bar.bottom - gtalk_ui.softkey_bar.top);

		gtalk_ui.listbox_img_status.left = 0;
		gtalk_ui.listbox_img_status.right = 12;
		gtalk_ui.listbox_img_status.top = 0;
		gtalk_ui.listbox_img_status.bottom = 12;
	
		gtalk_ui.listbox_img_msgcome.right = screen_width - 12;
		gtalk_ui.listbox_img_msgcome.left = gtalk_ui.listbox_img_msgcome.right - 28;
		gtalk_ui.listbox_img_msgcome.top = 0;
		gtalk_ui.listbox_img_msgcome.bottom = 16;

		gtalk_ui.listbox_img_arrow.right = screen_width - 12;
		gtalk_ui.listbox_img_arrow.left = gtalk_ui.listbox_img_arrow.right - 8;
		gtalk_ui.listbox_img_arrow.top = 0;
		gtalk_ui.listbox_img_arrow.bottom = 8;
		
		gtalk_ui.listbox_username.left = gtalk_ui.listbox_img_status.right;
		gtalk_ui.listbox_username.right = gtalk_ui.listbox_img_msgcome.left;
		gtalk_ui.listbox_username.top = 0;
		gtalk_ui.listbox_username.bottom = 0;

		gtalk_ui.login_logo.left = 0;
		gtalk_ui.login_logo.top = 0;
		gtalk_ui.login_logo.right = screen_width;
		gtalk_ui.login_logo.bottom = 100;

		gtalk_ui.login_label_user.left = 5;
		gtalk_ui.login_label_user.top = gtalk_ui.login_logo.bottom + 1;
		gtalk_ui.login_label_user.right = screen_width - 5;
		gtalk_ui.login_label_user.bottom = gtalk_ui.login_label_user.top + 30;

		gtalk_ui.login_edit_user.left = 5;
		gtalk_ui.login_edit_user.top = gtalk_ui.login_label_user.bottom;
		gtalk_ui.login_edit_user.right = screen_width - 5;
		gtalk_ui.login_edit_user.bottom = gtalk_ui.login_edit_user.top + 30;

		gtalk_ui.login_label_pass.left = 5;
		gtalk_ui.login_label_pass.top = gtalk_ui.login_edit_user.bottom + 1;
		gtalk_ui.login_label_pass.right = screen_width - 5;
		gtalk_ui.login_label_pass.bottom = gtalk_ui.login_label_pass.top + 30;

		gtalk_ui.login_edit_pass.left = 5;
		gtalk_ui.login_edit_pass.top = gtalk_ui.login_label_pass.bottom;
		gtalk_ui.login_edit_pass.right = screen_width - 5;
		gtalk_ui.login_edit_pass.bottom = gtalk_ui.login_edit_pass.top + 30;
		break;
	case ENUM_SUPPORT_QVGA_LS:
		img_name[IMG_ID_LOGIN_LOGO] = "320X240_login_logo.gif";
		img_name[IMG_ID_BTN_BG] = "320X240_buttonbar.gif";
		img_name[IMG_ID_TITLEBG] = "320X240_title_bg.gif";
		img_name[IMG_ID_ARROW] = "arrow.gif";
		img_name[IMG_ID_STATUSOFFLINE] = "status_off.gif";
		img_name[IMG_ID_STATUSAWAY] = "status_away.gif";
		img_name[IMG_ID_STATUSONLINE] = "status_on.gif";
		img_name[IMG_ID_COMEMSG] = "comemsg.gif";
		
		gtalk_ui.softkey_bar.left = 0;
		gtalk_ui.softkey_bar.top = screen_height - 28;
		gtalk_ui.softkey_bar.right = screen_width;
		gtalk_ui.softkey_bar.bottom = screen_height;

		gtalk_ui.title_top_bg.left = 0;
		gtalk_ui.title_top_bg.top = 0;
		gtalk_ui.title_top_bg.right = screen_width;
		gtalk_ui.title_top_bg.bottom = 28;

		gtalk_ui.title_img_status.left = (gtalk_ui.title_top_bg.bottom - 12)/2;
		gtalk_ui.title_img_status.top = gtalk_ui.title_img_status.left;
		gtalk_ui.title_img_status.right = gtalk_ui.title_img_status.left*2 + 12;
		gtalk_ui.title_img_status.bottom = gtalk_ui.title_img_status.top + 12;

		gtalk_ui.title_msg_status.left = gtalk_ui.title_img_status.right;
		gtalk_ui.title_msg_status.top = gtalk_ui.title_top_bg.top + 1;
		gtalk_ui.title_msg_status.right = screen_width - gtalk_ui.title_top_bg.bottom;
		gtalk_ui.title_msg_status.bottom = gtalk_ui.title_top_bg.bottom - 1;

		gtalk_ui.listbox.left = 0;
		gtalk_ui.listbox.top = gtalk_ui.title_top_bg.bottom;
		gtalk_ui.listbox.right = screen_width;
		gtalk_ui.listbox.bottom = screen_height - (gtalk_ui.softkey_bar.bottom - gtalk_ui.softkey_bar.top);

		gtalk_ui.listbox_img_status.left = 0;
		gtalk_ui.listbox_img_status.right = 12;
		gtalk_ui.listbox_img_status.top = 0;
		gtalk_ui.listbox_img_status.bottom = 12;
	
		gtalk_ui.listbox_img_msgcome.right = screen_width - 12;
		gtalk_ui.listbox_img_msgcome.left = gtalk_ui.listbox_img_msgcome.right - 28;
		gtalk_ui.listbox_img_msgcome.top = 0;
		gtalk_ui.listbox_img_msgcome.bottom = 16;

		gtalk_ui.listbox_img_arrow.right = screen_width - 12;
		gtalk_ui.listbox_img_arrow.left = gtalk_ui.listbox_img_arrow.right - 8;
		gtalk_ui.listbox_img_arrow.top = 0;
		gtalk_ui.listbox_img_arrow.bottom = 8;
		
		gtalk_ui.listbox_username.left = gtalk_ui.listbox_img_status.right;
		gtalk_ui.listbox_username.right = gtalk_ui.listbox_img_msgcome.left;
		gtalk_ui.listbox_username.top = 0;
		gtalk_ui.listbox_username.bottom = 0;

		gtalk_ui.login_logo.left = 0;
		gtalk_ui.login_logo.top = 0;
		gtalk_ui.login_logo.right = screen_width;
		gtalk_ui.login_logo.bottom = 100;

		gtalk_ui.login_label_user.left = 5;
		gtalk_ui.login_label_user.top = gtalk_ui.login_logo.bottom + 1;
		gtalk_ui.login_label_user.right = screen_width - 5;
		gtalk_ui.login_label_user.bottom = gtalk_ui.login_label_user.top + 24;

		gtalk_ui.login_edit_user.left = 5;
		gtalk_ui.login_edit_user.top = gtalk_ui.login_label_user.bottom;
		gtalk_ui.login_edit_user.right = screen_width - 5;
		gtalk_ui.login_edit_user.bottom = gtalk_ui.login_edit_user.top + 24;

		gtalk_ui.login_label_pass.left = 5;
		gtalk_ui.login_label_pass.top = gtalk_ui.login_edit_user.bottom + 1;
		gtalk_ui.login_label_pass.right = screen_width - 5;
		gtalk_ui.login_label_pass.bottom = gtalk_ui.login_label_pass.top + 24;

		gtalk_ui.login_edit_pass.left = 5;
		gtalk_ui.login_edit_pass.top = gtalk_ui.login_label_pass.bottom;
		gtalk_ui.login_edit_pass.right = screen_width - 5;
		gtalk_ui.login_edit_pass.bottom = gtalk_ui.login_edit_pass.top + 24;
		break;
	case ENUM_SUPPORT_WQVGA:
		img_name[IMG_ID_LOGIN_LOGO] = "240X400_login_logo.gif";
		img_name[IMG_ID_BTN_BG] = "240X400_buttonbar.gif";
		img_name[IMG_ID_TITLEBG] = "240X400_title_bg.gif";
		img_name[IMG_ID_ARROW] = "arrow.gif";
		img_name[IMG_ID_STATUSOFFLINE] = "status_off.gif";
		img_name[IMG_ID_STATUSAWAY] = "status_away.gif";
		img_name[IMG_ID_STATUSONLINE] = "status_on.gif";
		img_name[IMG_ID_COMEMSG] = "comemsg.gif";
		
		gtalk_ui.softkey_bar.left = 0;
		gtalk_ui.softkey_bar.top = screen_height - 28;
		gtalk_ui.softkey_bar.right = screen_width;
		gtalk_ui.softkey_bar.bottom = screen_height;

		gtalk_ui.title_top_bg.left = 0;
		gtalk_ui.title_top_bg.top = 0;
		gtalk_ui.title_top_bg.right = screen_width;
		gtalk_ui.title_top_bg.bottom = 28;

		gtalk_ui.title_img_status.left = (gtalk_ui.title_top_bg.bottom - 12)/2;
		gtalk_ui.title_img_status.top = gtalk_ui.title_img_status.left;
		gtalk_ui.title_img_status.right = gtalk_ui.title_img_status.left*2 + 12;
		gtalk_ui.title_img_status.bottom = gtalk_ui.title_img_status.top + 12;

		gtalk_ui.title_msg_status.left = gtalk_ui.title_img_status.right;
		gtalk_ui.title_msg_status.top = gtalk_ui.title_top_bg.top + 1;
		gtalk_ui.title_msg_status.right = screen_width - gtalk_ui.title_top_bg.bottom;
		gtalk_ui.title_msg_status.bottom = gtalk_ui.title_top_bg.bottom - 1;

		gtalk_ui.listbox.left = 0;
		gtalk_ui.listbox.top = gtalk_ui.title_top_bg.bottom;
		gtalk_ui.listbox.right = screen_width;
		gtalk_ui.listbox.bottom = screen_height - (gtalk_ui.softkey_bar.bottom - gtalk_ui.softkey_bar.top);

		gtalk_ui.listbox_img_status.left = 0;
		gtalk_ui.listbox_img_status.right = 12;
		gtalk_ui.listbox_img_status.top = 0;
		gtalk_ui.listbox_img_status.bottom = 12;
	
		gtalk_ui.listbox_img_msgcome.right = screen_width - 12;
		gtalk_ui.listbox_img_msgcome.left = gtalk_ui.listbox_img_msgcome.right - 28;
		gtalk_ui.listbox_img_msgcome.top = 0;
		gtalk_ui.listbox_img_msgcome.bottom = 16;

		gtalk_ui.listbox_img_arrow.right = screen_width - 12;
		gtalk_ui.listbox_img_arrow.left = gtalk_ui.listbox_img_arrow.right - 8;
		gtalk_ui.listbox_img_arrow.top = 0;
		gtalk_ui.listbox_img_arrow.bottom = 8;
		
		gtalk_ui.listbox_username.left = gtalk_ui.listbox_img_status.right;
		gtalk_ui.listbox_username.right = gtalk_ui.listbox_img_msgcome.left;
		gtalk_ui.listbox_username.top = 0;
		gtalk_ui.listbox_username.bottom = 0;

		gtalk_ui.login_logo.left = 0;
		gtalk_ui.login_logo.top = 0;
		gtalk_ui.login_logo.right = screen_width;
		gtalk_ui.login_logo.bottom = 100;

		gtalk_ui.login_label_user.left = 5;
		gtalk_ui.login_label_user.top = gtalk_ui.login_logo.bottom + 1;
		gtalk_ui.login_label_user.right = screen_width - 5;
		gtalk_ui.login_label_user.bottom = gtalk_ui.login_label_user.top + 30;

		gtalk_ui.login_edit_user.left = 5;
		gtalk_ui.login_edit_user.top = gtalk_ui.login_label_user.bottom;
		gtalk_ui.login_edit_user.right = screen_width - 5;
		gtalk_ui.login_edit_user.bottom = gtalk_ui.login_edit_user.top + 30;

		gtalk_ui.login_label_pass.left = 5;
		gtalk_ui.login_label_pass.top = gtalk_ui.login_edit_user.bottom + 1;
		gtalk_ui.login_label_pass.right = screen_width - 5;
		gtalk_ui.login_label_pass.bottom = gtalk_ui.login_label_pass.top + 30;

		gtalk_ui.login_edit_pass.left = 5;
		gtalk_ui.login_edit_pass.top = gtalk_ui.login_label_pass.bottom;
		gtalk_ui.login_edit_pass.right = screen_width - 5;
		gtalk_ui.login_edit_pass.bottom = gtalk_ui.login_edit_pass.top + 30;
		break;
	}
}

VMSTR get_img_name(VMINT index)
{
	return img_name[index];
}


